package edu.neusoft.springhtmldemo.service;

import edu.neusoft.springhtmldemo.domain.DatasubStationManagement;
import edu.neusoft.springhtmldemo.mapper.DatasubStationManagementMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DatasubStationManagementService {
    @Autowired
    private DatasubStationManagementMapper mapper;

    public List<DatasubStationManagement> showAll() {
        return mapper.selectAll();
    }

    public void updateDatasubStation(DatasubStationManagement management) {
        mapper.updateDatasubStation(management);
    }

    public List<DatasubStationManagement> selectDatasubStationManagement(String datastationID,String datastationName,String datastationIP,String datastationLocation) {
        return mapper.selectDatasubStationManagement(datastationID,datastationName,datastationIP,datastationLocation);
    }

    public void addDatasubStationManagement(DatasubStationManagement management) {
        mapper.addDatasubStationManagement(management);
    }

    public void delDatasubStationManagement(Integer datastationID) {
        mapper.delDatasubStationManagement(datastationID);
    }

    public List<String> datastationIPValues() {
        return mapper.datastationIPValues();
    }

    public String datastationNameValue(String datastationIP) {
        return mapper.datastationNameValue(datastationIP);
    }
}
